#!/bin/bash

# Get the absolute path
absolute_path=$(realpath "$1")
echo "Base path: $absolute_path"

# Construct path for the args file
args_path="$absolute_path/auto_cast.args"
ARGS=$(cat $args_path)
echo "Arguments from file: $ARGS"

# Capture additional arguments passed to the script
additional_args="${@:2}"

# Combine default ARGS with additional arguments
FINAL_ARGS="$ARGS $additional_args"

# Execute the Python script with the combined arguments
python3 start.py $FINAL_ARGS --base-path $absolute_path
